import httpRequest from '../../utils/request'
import modules from '../modules'
const defaultRoute = 'Shopfloor_Foundation'
const controllerName = 'Foundation'

export interface FoundationParam {
  FoundationName: string | null
  PageIndex: number
  PageSize: number
  totalCount: number
 
}


// 获取基地列表
export function ApiGetShopfloor_FoundationPageListAsync(param: FoundationParam) {
  return httpRequest({
    url: `${modules.shopfloorModuleUrl}/${controllerName}/Get${defaultRoute}PageList`,
    method: "Post",
    data: param,
  });
}

// 批量删除基地
export function ApiDeletionShopfloor_FoundationAsync(param: string[]) {
  return httpRequest({
    url: `${modules.shopfloorModuleUrl}/${controllerName}/Deletion${defaultRoute}`,
    method: "Post",
    data: param,
  });
}


// 添加基地
export function ApiCreateShopfloor_FoundationAsync(param: object) {
  return httpRequest({
    url: `${modules.shopfloorModuleUrl}/${controllerName}/Create${defaultRoute}`,
    method: "Post",
    data: param,
  });
}


// 更新基地
export function ApiUpdateShopfloor_FoundationAsync(param: object) {
  return httpRequest({
    url: `${modules.shopfloorModuleUrl}/${controllerName}/Update${defaultRoute}`,
    method: "Post",
    data: param,
  });
}